package cn.hehuoren.quartz.model;


import cn.hehuoren.core.utils.DateUtil;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;


/**
 * 
 * @Title 
 * @Description 定时任务VO 
 * @Copyright Copyright (c) 2015</p>
 * @Company 源本信息科技有限公司 Co., Ltd.</p>
 * @author ZhouMin
 * @version 1.0
 * @修改记录
 * @修改序号，修改日期，修改人，修改内容
 */
public class QuartzManager implements Serializable{
	/**
     * Comment for <code>serialVersionUID</code>
     */
    private static final long serialVersionUID = -7037331255229627806L;
    private String dtlSchedName;
	private String dtlJobName;
	private String dtlJobGroup;
	private String dtlDescription;
	private String dtlJobClassName;
	private String dtlIsDurable;
	private String dtlIsNonconcurrent;
	private String dtlIsUpdateData;
	private String dtlRequestsRecovery;
	private byte[] dtlJobData;
	private String trigSchedName;
	private String trigTriggerName;
	private String trigTriggerGroup;
	private String trigJobName;
	private String trigJobGroup;
	private String trigDescription;
	private Long trigNextFireTime;
	private Long trigPrevFireTime;
	private String trigNextFireTimeStr;//下次执行时间
	private String trigPrevFireTimeStr;//上次执行时间
	private Long trigPriority;
	private String trigTriggerState;
	private String trigTriggerType;
	private Long trigStartTime;
	private Long trigEndTime;
	private String trigStartTimeStr;//生效日期
	private String trigEndTimeStr;//失效日期
	private Integer trigMisfireInstr;
	private byte[] trigJobData;
	private String cronSchedName;
	private String cronTriggerName;
	private String cronTriggerGroup;
	private String cronCronExpression;
	private HashMap<String,String> jobDataMap;
	public String getDtlSchedName() {
		return dtlSchedName;
	}
	public void setDtlSchedName(String dtlSchedName) {
		this.dtlSchedName = dtlSchedName;
	}
	public String getDtlJobName() {
		return dtlJobName;
	}
	public void setDtlJobName(String dtlJobName) {
		this.dtlJobName = dtlJobName;
	}
	public String getDtlJobGroup() {
		return dtlJobGroup;
	}
	public void setDtlJobGroup(String dtlJobGroup) {
		this.dtlJobGroup = dtlJobGroup;
	}
	public String getDtlDescription() {
		return dtlDescription;
	}
	public void setDtlDescription(String dtlDescription) {
		this.dtlDescription = dtlDescription;
	}
	public String getDtlJobClassName() {
		return dtlJobClassName;
	}
	public void setDtlJobClassName(String dtlJobClassName) {
		this.dtlJobClassName = dtlJobClassName;
	}
	public String getDtlIsDurable() {
		return dtlIsDurable;
	}
	public void setDtlIsDurable(String dtlIsDurable) {
		this.dtlIsDurable = dtlIsDurable;
	}
	public String getDtlIsNonconcurrent() {
		return dtlIsNonconcurrent;
	}
	public void setDtlIsNonconcurrent(String dtlIsNonconcurrent) {
		this.dtlIsNonconcurrent = dtlIsNonconcurrent;
	}
	public String getDtlIsUpdateData() {
		return dtlIsUpdateData;
	}
	public void setDtlIsUpdateData(String dtlIsUpdateData) {
		this.dtlIsUpdateData = dtlIsUpdateData;
	}
	public String getDtlRequestsRecovery() {
		return dtlRequestsRecovery;
	}
	public void setDtlRequestsRecovery(String dtlRequestsRecovery) {
		this.dtlRequestsRecovery = dtlRequestsRecovery;
	}
	public byte[] getDtlJobData() {
		return dtlJobData;
	}
	public void setDtlJobData(byte[] dtlJobData) {
		this.dtlJobData = dtlJobData;
	}
	public String getTrigSchedName() {
		return trigSchedName;
	}
	public void setTrigSchedName(String trigSchedName) {
		this.trigSchedName = trigSchedName;
	}
	public String getTrigTriggerName() {
		return trigTriggerName;
	}
	public void setTrigTriggerName(String trigTriggerName) {
		this.trigTriggerName = trigTriggerName;
	}
	public String getTrigTriggerGroup() {
		return trigTriggerGroup;
	}
	public void setTrigTriggerGroup(String trigTriggerGroup) {
		this.trigTriggerGroup = trigTriggerGroup;
	}
	public String getTrigJobName() {
		return trigJobName;
	}
	public void setTrigJobName(String trigJobName) {
		this.trigJobName = trigJobName;
	}
	public String getTrigJobGroup() {
		return trigJobGroup;
	}
	public void setTrigJobGroup(String trigJobGroup) {
		this.trigJobGroup = trigJobGroup;
	}
	public String getTrigDescription() {
		return trigDescription;
	}
	public void setTrigDescription(String trigDescription) {
		this.trigDescription = trigDescription;
	}
	public Long getTrigPriority() {
		return trigPriority;
	}
	public void setTrigPriority(Long trigPriority) {
		this.trigPriority = trigPriority;
	}
	public String getTrigTriggerState() {
		return trigTriggerState;
	}
	public void setTrigTriggerState(String trigTriggerState) {
		this.trigTriggerState = trigTriggerState;
	}
	public String getTrigTriggerType() {
		return trigTriggerType;
	}
	public void setTrigTriggerType(String trigTriggerType) {
		this.trigTriggerType = trigTriggerType;
	}
	public Integer getTrigMisfireInstr() {
		return trigMisfireInstr;
	}
	public void setTrigMisfireInstr(Integer trigMisfireInstr) {
		this.trigMisfireInstr = trigMisfireInstr;
	}
	public byte[] getTrigJobData() {
		return trigJobData;
	}
	public void setTrigJobData(byte[] trigJobData) {
		this.trigJobData = trigJobData;
	}
	public String getCronSchedName() {
		return cronSchedName;
	}
	public void setCronSchedName(String cronSchedName) {
		this.cronSchedName = cronSchedName;
	}
	public String getCronTriggerName() {
		return cronTriggerName;
	}
	public void setCronTriggerName(String cronTriggerName) {
		this.cronTriggerName = cronTriggerName;
	}
	public String getCronTriggerGroup() {
		return cronTriggerGroup;
	}
	public void setCronTriggerGroup(String cronTriggerGroup) {
		this.cronTriggerGroup = cronTriggerGroup;
	}
	public String getCronCronExpression() {
		return null != this.cronCronExpression ? this.cronCronExpression.trim()
				: "临时任务";
	}
	public void setCronCronExpression(String cronCronExpression) {
		this.cronCronExpression = cronCronExpression;
	}
	public HashMap<String,String> getJobDataMap() {
		if(null == this.jobDataMap) {
			jobDataMap = new HashMap<String,String>();
		}
		return jobDataMap;
	}
	public void setJobDataMap(HashMap<String,String> jobDataMap) {
		this.jobDataMap = jobDataMap;
	}
	public Long getTrigNextFireTime() {
		return trigNextFireTime;
	}
	public void setTrigNextFireTime(Long trigNextFireTime) {
		this.trigNextFireTime = trigNextFireTime;
	}
	public Long getTrigPrevFireTime() {
		return trigPrevFireTime;
	}
	public void setTrigPrevFireTime(Long trigPrevFireTime) {
		this.trigPrevFireTime = trigPrevFireTime;
	}
	public Long getTrigStartTime() {
		return trigStartTime;
	}
	public void setTrigStartTime(Long trigStartTime) {
		this.trigStartTime = trigStartTime;
	}
	public Long getTrigEndTime() {
		return trigEndTime;
	}
	public void setTrigEndTime(Long trigEndTime) {
		this.trigEndTime = trigEndTime;
	}
	public String getTrigNextFireTimeStr() {
		return DateUtil.format(new Date(this.trigNextFireTime), "yyyy-MM-dd HH:mm:ss");
	}
	public void setTrigNextFireTimeStr(String trigNextFireTimeStr) {
		this.trigNextFireTimeStr = trigNextFireTimeStr;
	}
	public String getTrigPrevFireTimeStr() {
		if(this.trigPrevFireTime == -1){
			return "--";
		}else{
			return DateUtil.format(new Date(this.trigPrevFireTime), "yyyy-MM-dd HH:mm:ss");
		}
	}
	public void setTrigPrevFireTimeStr(String trigPrevFireTimeStr) {
		this.trigPrevFireTimeStr = trigPrevFireTimeStr;
	}
	public String getTrigStartTimeStr() {
		if(this.trigStartTime!=null && this.trigStartTime!=0){
			return this.trigStartTimeStr = DateUtil.format(new Date(this.trigStartTime), "yyyy-MM-dd HH:mm:ss").substring(0,10);
		}else{
			return this.trigStartTimeStr;	
		}
	}
	public void setTrigStartTimeStr(String trigStartTimeStr) {
			this.trigStartTimeStr = trigStartTimeStr;
	}
	public String getTrigEndTimeStr() {
		if(this.trigEndTime!=null && this.trigEndTime!=0){
			return this.trigEndTimeStr = DateUtil.format(new Date(this.trigEndTime), "yyyy-MM-dd HH:mm:ss").substring(0,10);
		}else{
			return this.trigEndTimeStr;
		}
	}
	public void setTrigEndTimeStr(String trigEndTimeStr) {
			this.trigEndTimeStr = trigEndTimeStr;
	}
	
}
